package com.micro.ai.template;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * Template服务启动类
 *
 * @author micro-ai
 * @since 0.0.1
 * @version 2.0 支持多租户和Feign调用
 */
@SpringBootApplication(scanBasePackages = {
    "com.micro.ai.template",
    "com.micro.ai.commons"
})
@EnableDiscoveryClient
@EnableFeignClients(basePackages = "com.micro.ai.template.client")
@EnableTransactionManagement
@MapperScan("com.micro.ai.template.mapper")
public class TemplateApplication {

    public static void main(String[] args) {
        SpringApplication.run(TemplateApplication.class, args);
        System.out.println("""
            
            ============================================================
              🚀 Micro-AI Template 服务启动成功！
              
              服务端口: 9002
              API文档: http://localhost:9002/doc.html
              Swagger: http://localhost:9002/swagger-ui.html
              健康检查: http://localhost:9002/actuator/health
            ============================================================
            """);
    }
}
